<!DOCTYPE html>
<html>
<head>
    <title>应用版本</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div id="queryDiv" class="queryDiv">
            <div class="grid-btn">
                <div class="form-group col-sm-2 keyword">
                    <input type="text" class="form-control" id="keyword" @keyup.enter="query"
                           placeholder="包名">
                </div>
                <a class="btn btn-primary" @click="query">查询</a>

                #if($shiro.hasPermission("glass/sysversion:save"))
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                #end
                #if($shiro.hasPermission("glass/sysversion:update"))
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                #end
                #if($shiro.hasPermission("glass/sysversion:delete"))
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                #end
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" style="margin-top: 20px">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal" id="addform">
            <div class="form-group">
                <div class="col-sm-2 control-label">版本名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control  validate[required]" v-model="sysversion.versionname"
                           placeholder="版本名称"
                    />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">版本号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control  validate[required]" v-model="sysversion.versioncode"
                           placeholder="版本号"
                    />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">包名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control  validate[required]" v-model="sysversion.packagename"
                           placeholder="包名"
                    />
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">平台</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control  validate[required]" v-model="sysversion.platform"
                           placeholder="0:阿里云 1:华为云"
                    />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">内容</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sysversion.content" placeholder="内容"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">下载地址</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control  validate[required]" v-model="sysversion.loadurl"
                           placeholder="下载地址"
                    />
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">是否强制更新</div>
                <div class="col-sm-10">
                    <!--<input type="text" class="form-control validate[required]" v-model="sysversion.must"-->
                    <!--placeholder="0:是 1:否"-->
                    <!--/>-->
                    <select id="must" type="text" class="form-control" v-model="sysversion.must">
                        <option value="1">否</option>
                        <option value="0">是</option>
                    </select>
                </div>
            </div>
            <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">排序</div>-->
            <!--<div class="col-sm-10">-->
            <!--<input type="text" class="form-control" v-model="sysversion.sortid" placeholder="排序"/>-->
            <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">删除状态</div>-->
            <!--<div class="col-sm-10">-->
            <!--<input type="text" class="form-control" v-model="sysversion.isdeleted" placeholder="删除状态"/>-->
            <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">操作者</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sysversion.operaterid" placeholder="操作者"
                           disabled/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">创建时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sysversion.createdtime" placeholder="创建时间"
                           disabled/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">修改时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sysversion.editedtime" placeholder="修改时间"
                           disabled/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${rc.contextPath}/js/glass/sysversion/sysversion.js?_${date.systemTime}"></script>
</body>
</html>